#! /usr/bin/env python
# encoding: utf-8
# Anton Feldmann 2014
 
def configure(conf):
    pass
 
def build(bld):
    libsafety=bld(
        features     = ['cxx'],
        target       = 'robos',
        cxxflags     = ['-Wall','-std=c++11','-stdlib=libstdc++'],
        source       = bld.path.ant_glob(['src/robos/*.cpp']),
        includes     = bld.path.ant_glob(['**/*.hpp']),
        install_path = '${PREFIX}/lib'
    )
    
    # headerfile install
    bld.install_files('${PREFIX}/include/safety/', bld.path.ant_glob(['include/safety/*.hpp','include/safety/*.h'], remove=False))

    from waflib import Options
    if Options.options.debug:
        libsafety.cxxflags.extend(['-g', '-O0'])
    else:
        libsafety.cxxflags.extend('-O3')

        
    libsafety.features.append('cxxshlib' if Options.options.shared else 'cxxstlib')
